import java.util.UUID;

import de.tum.in.eist.poll.pub.shared.Student;
import de.tum.in.eist.poll.server.Database;

public class test {

	public static void main(String[] args) {
		for (Student s : Database.getStudents()) {
			System.out.println(s.getPassword() + " " + s.getName());
		}
		System.out.println(UUID.randomUUID().toString());
		
	}
	
	/*
	public String evaluate(ArrayList<FeedbackText> answers) {
		StringBuilder accum = new StringBuilder();
		// TODO: escape strings!
		accum.append("<br><b>" + question.getDescription() + "</b>");
		for (FeedbackText answer: answers) {
			if (!answer.getText().isEmpty()) {
				accum.append(answer.getText());
				accum.append("<hr/>");
			}
		}
		return accum.toString();
	}
	
	public String evaluate(ArrayList<FeedbackSingleChoice> answers) {
		int size = question.getChoices().length;
		double participants = answers.size();
		
		double[] percents = new double[size];
		int[]    totals   = new int[size];
		
		StringBuilder accum = new StringBuilder(); 
		
		for (FeedbackSingleChoice answer: answers) {
			totals[answer.getChoice()] += 1;
		}
		
		int i = 0;
		accum.append("<br/><b>" + Question.getDescription() + "</b>");
		accum.append("Gesamtstimmen: " + size);
		accum.append("<ul>");
		for (String choice : question.getChoices()) {
			percents[i] = totals[i]/participants;
			accum.append("<li>");
			accum.append(choice);
			accum.append("(Votes: " + totals[i]);
			accum.append(", Anteil: " + percents[i]*100);
			accum.append("%)");
			accum.append("</li>");
			++i;
		}
		accum.append("</ul>");
		
		return accum.toString();
	}
	
	*/
}
